const app = getApp()
var api = require('../../utils/api.js')
var util = require('../../utils/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    footPrintListData:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    this.footPrintList();
  },
  footPrintList:function(){
    var that = this
    api.POST({
      params:'',
      url: app.globalData.base_url + "inn/footprintList",
      success: function (res) {
        if (util.isEmpty(res.data.code)) {
          if (res.data.data instanceof Array){
            that.setData({
              footPrintListData: res.data.data
            })
          }
        } else {
          util.showError(res.data.message);
        }
      }
    })
  },
  jumpLink:function(e){
    var inn_id = e.currentTarget.dataset.inn_id;
    wx.navigateTo({
      url: '../storeGoodsList/storeGoodsList?inn_id=' + inn_id
    })
  }
})